package cn.ywsj.ywsjmidtier.controller;

import cn.ywsj.ywsjmidtier.service.WechatMarketingActivitiesRestFeign;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "营销活动")
@RestController
@RequestMapping("/wechat/marketingactivities")
public class WechatMarketingActivitiesRestController {

    @Autowired
    private WechatMarketingActivitiesRestFeign feign;

    /**
     * 促销详情1
     * 121,300932
     * @param productId
     * @param custId
     * @return
     */
    @ApiOperation("促销详情")
    @GetMapping(value = {"/marketingactivities"})
    public String marketingActivities(String productId, Long custId) {
        return feign.ajaxHotActivity(productId,custId);
    }

    /**
     * 购物车_常购清单
     * @param productId
     * @return
     */
    @ApiOperation("购物车_常购清单")
    @GetMapping(value = {"/marketingactivitieslist"})
    public String marketingActivitiesList(String productId) {
        return feign.marketingActivitiesList(productId);
    }

}
